package org.domeos.framework.api.controller.global;

import org.domeos.basemodel.HttpResponseTemp;
import org.domeos.basemodel.ResultStat;
import org.domeos.framework.api.service.global.ResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


import io.swagger.annotations.Api;

@Controller
@RequestMapping("/api/global/resourceshow")
@Api("服务相关api")
public class ResourceController {
	@Autowired
	ResourceService resourceservice;
	
	@ResponseBody
	@RequestMapping(value = "/listpod/{clusterName}",method=RequestMethod.GET)
	public HttpResponseTemp<?> listpod(@PathVariable String clusterName){
		return resourceservice.getPodInfo(clusterName);
	}
	
	@ResponseBody
	@RequestMapping(value = "/collect/{clusterName}",method=RequestMethod.GET)
	public HttpResponseTemp<?> resourcecollect(@PathVariable String clusterName){
		return resourceservice.resourceCollect(clusterName);
	}
}
